/* 
描述：LikeServiceImpl类实现了点赞服务的业务逻辑，负责处理用户对问题和评论的点赞状态管理，
包括点赞记录的增删改查操作，是问答社区互动功能的核心服务实现。
完成人：吴悠 
完成时间: 2025/04/27
*/
package com.jiesenhe.qacommunity.service.impl;

import com.jiesenhe.qacommunity.mapper.LikeMapper;
import com.jiesenhe.qacommunity.pojo.Like;
import com.jiesenhe.qacommunity.pojo.LikeQuestion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LikeServiceImpl implements com.jiesenhe.qacommunity.service.LikeService {
    @Autowired
    LikeMapper likeMapper;

    @Override
    public int getLikeStatus(Like like){
        return likeMapper.getLikeStatus(like);
    }

    @Override
    public int addLikeRecord(Like like){
        return likeMapper.addLikeRecord(like);
    }

    @Override
    public int deleteLikeRecord(Like like){
        return likeMapper.deleteLikeRecord(like);
    }

    @Override
    public int updateLikeStatus(Like like) {
        return likeMapper.updateLikeStatus(like);
    }

    @Override
    public int deleteLikeStatus(Like like) {
        return likeMapper.deleteLikeStatus(like);
    }

    @Override
    public List<LikeQuestion> getLikeQuestion(int userId){
        return likeMapper.getLikeQuestion(userId);
    }
}
